import 'package:date_format/date_format.dart';
import 'dart:developer';

class Log {
  static void debug(Object? object, {bool showFullLog = false}) {
    String now = formatDate(new DateTime.now(), [HH, ':', nn, ':', ss]);
    const bool isProduction = bool.fromEnvironment('dart.vm.product');
    if(!isProduction) {
      try {
        if (showFullLog)
          log('[$now] $object');
        else
          print('[$now] $object');
      } catch (error) {
        print(error);
      }
    }
  }
}
